<?php /* Smarty version 2.6.18, created on 2009-05-07 13:22:48
         compiled from ua-admin/ad_edit.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_radios', 'ua-admin/ad_edit.html', 76, false),array('modifier', 'default', 'ua-admin/ad_edit.html', 76, false),array('modifier', 'date_format', 'ua-admin/ad_edit.html', 112, false),)), $this); ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->_tpl_vars['Charset']; ?>
">
<link rel="stylesheet" type="text/css" href="css/main.css">
<script language="javascript" src="<?php echo $this->_tpl_vars['JS_PATH']; ?>
js/prototype.js"></script>
<script language="javascript" src="<?php echo $this->_tpl_vars['JS_PATH']; ?>
js/popcalendar.js"></script>
<script language="javascript" src="<?php echo $this->_tpl_vars['JS_PATH']; ?>
js/general.js"></script>
<script language="javascript" src="<?php echo $this->_tpl_vars['JS_PATH']; ?>
js/admin.js"></script>
<script language="JavaScript">
function hideorshow(Div1,Div2){
$(Div1).style.display = 'block';
$(Div2).style.display = 'none';
}
</script>
</head>

<body leftmargin="10" topmargin="10">
<table width="100%" border="0" cellpadding="2" cellspacing="6"><tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="guide"><tr>
  <td><div align="left"><a href="#" onClick="parent.main.location='home.php';return false;">控制台</a>&nbsp;&raquo;&nbsp;广告编辑</div></td>
</tr></table>
<form name="editfrm" method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>
">
<input type="hidden" name="id" value="<?php echo $_GET['id']; ?>
" />
<input type="hidden" name="member[id]" value="<?php echo $this->_tpl_vars['a']['member_id']; ?>
" />
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
<tr class="header">
  <td colspan="5">网站广告</td>
</tr>

<tr>
  <td class="altbg1" width="24%"><strong>会员名:</strong></td>
  <td colspan="4" class="altbg2"><input name="member[username]" type="text" id="member_username" value="<?php echo $_GET['username']; ?>
"></td>
</tr>

<tr>
  <td class="altbg1"><strong>广告标题:</strong></td>
  <td colspan="4" class="altbg2"><input type="text" name="ad[title]" value="<?php echo $this->_tpl_vars['a']['title']; ?>
"></td>
</tr>

<tr>
  <td class="altbg1"><strong>广告描述</strong>:</td>
  <td colspan="4" class="altbg2"><textarea name="ad[description]" rows="6" cols="25"><?php echo $this->_tpl_vars['a']['description']; ?>
</textarea></td>
</tr>

<tr>
  <td class="altbg1"><strong>广告容器名称 :</strong></td>
  <td colspan="4" class="altbg2"><select name="ad[adzone_id]" id="ad_adzone_id">
    <?php $_from = $this->_tpl_vars['Adzones']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['sel_adzone'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['sel_adzone']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['z']):
        $this->_foreach['sel_adzone']['iteration']++;
?>
    <option value="<?php echo $this->_tpl_vars['z']['id']; ?>
" <?php if ($this->_tpl_vars['z']['id'] == $this->_tpl_vars['a']['adzone_id']): ?>selected<?php endif; ?>>
      <?php echo $this->_tpl_vars['z']['name']; ?>

    <?php endforeach; else: ?>
    <option value="0">请补充广告位置
      <?php endif; unset($_from); ?>
    </select></td>
</tr>
<tr>
<td class="altbg1"><strong>关键词 :</strong></td>
<td colspan="4" class="altbg2"><input type="text" name="ad[keywords]" value="<?php echo $this->_tpl_vars['a']['keywords']; ?>
"></td>
</tr>

<tr>
<td class="altbg1"><strong>文件名称 :</strong></td>
<td colspan="4" class="altbg2"><input name="ad[source_name]" type="text" id="ad[source_name]" value="<?php echo $this->_tpl_vars['a']['source_name']; ?>
"></td>
</tr>
<tr>
  <td class="altbg1"><strong>优先显示：</strong></td>
  <td colspan="4" class="altbg2"><select name="ad[priority]" id="AdPriority">
	<option value="1">1</option>
	<option value="2">2</option>
	<option value="3">3</option>
	<option value="4">4</option>
	<option value="5">5</option>
  </select></td>
</tr>
<tr>
  <td class="altbg1"><strong>媒体类型：</strong></td>
  <td colspan="4" class="altbg2"><?php echo smarty_function_html_radios(array('name' => "ad[source_type]",'options' => $this->_tpl_vars['AdTypes'],'checked' => ((is_array($_tmp=@$this->_tpl_vars['a']['source_type'])) ? $this->_run_mod_handler('default', true, $_tmp, '1') : smarty_modifier_default($_tmp, '1')),'separator' => ' '), $this);?>
</td>
</tr>
<tr>
  <td class="altbg1"><strong>链接方式：</strong></td>
  <td colspan="4" class="altbg2"><input type="radio" name="m_sourcetype" value="1" checked onclick="javascript:hideorshow('m_source_upload','m_source_addr');" />本地上传<input type="radio" name="m_sourcetype" value="2" onClick="hideorshow('m_source_addr','m_source_upload');" />远程链接</td>
</tr>
<tbody id="m_source_addr" style="display:none">
<tr>
  <td class="altbg1"><strong>远程地址：</strong></td>
  <td colspan="4" class="altbg2"><input type="text" size="35" name="ad[source_url]" value="<?php echo $this->_tpl_vars['a']['source_url']; ?>
"></td>
</tr>
</tbody>
<tbody id="m_source_upload" style="display:block">
<tr>
  <td class="altbg1"><strong>附件上传：</strong></td>
  <td colspan="4" class="altbg2"><input type="file" name="pic"></td>
</tr>
</tbody>
<tr>
  <td class="altbg1"><strong>指向地址：</strong> </td>
  <td colspan="4" class="altbg2"><input type="text" name="ad[target_url]" value="<?php echo $this->_tpl_vars['a']['target_url']; ?>
"></td>
</tr>
<tr>
  <td class="altbg1"><strong>打开窗口类型：</strong></td>
  <td colspan="4" class="altbg2"><select name="ad[da]" id="ad_da">
    <?php $_from = $this->_tpl_vars['AdsPopTargets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['sel_adda'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['sel_adda']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['da']):
        $this->_foreach['sel_adda']['iteration']++;
?>
    <option value="<?php echo $this->_tpl_vars['da']; ?>
"><?php echo $this->_tpl_vars['da']; ?>

      <?php endforeach; endif; unset($_from); ?>
    </select></td>
</tr>
<tr>
  <td class="altbg1"><strong>提示词语 :</strong></td>
  <td colspan="4" class="altbg2"><input type="text" name="ad[alt_words]" value="<?php echo $this->_tpl_vars['a']['alt_words']; ?>
"></td>
</tr>
<tr>
  <td class="altbg1"><strong>起止时间</strong></td>
  <td width="20%" align="left" class="altbg2"><input type="text" name="ServiceFromDate" size="10" value='<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['a']['start_date'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d") : smarty_modifier_date_format($_tmp, "%Y-%m-%d")))) ? $this->_run_mod_handler('default', true, $_tmp, 'None') : smarty_modifier_default($_tmp, 'None')); ?>
' id="date1" readonly>
<a href="javascript:;" onclick='showCalendar(this, $("date1"), "yyyy-mmmm-dd",null,0,-1,-1)'><img src="<?php echo $this->_tpl_vars['tpl_img_path']; ?>
calendar.gif" border="0" alt=""></a></td>
  <td width="8%" class="altbg2"><div align="center">到</div></td>
  <td width="24%" align="left" class="altbg2"><input type="text" name="ServiceEndDate" size="10" value='<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['a']['end_date'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d") : smarty_modifier_date_format($_tmp, "%Y-%m-%d")))) ? $this->_run_mod_handler('default', true, $_tmp, 'None') : smarty_modifier_default($_tmp, 'None')); ?>
' id="date2" readonly>
<a href="javascript:;" onclick='showCalendar(this, $("date2"), "yyyy-mmmm-dd",null,0,-1,-1)'><img src="<?php echo $this->_tpl_vars['tpl_img_path']; ?>
calendar.gif" border="0" alt=""></a></td>
  <td width="24%" align="left" class="altbg2">(默认为今天起一个月)</td>
</tr>


<tr>
  <td class="altbg1"><strong>是否上架：</strong>
  <br />
  （会员自定义）  </td>
  <td colspan="4" class="altbg2"><?php echo smarty_function_html_radios(array('name' => "ad[dc]",'options' => $this->_tpl_vars['AdsStatus'],'checked' => ((is_array($_tmp=@$this->_tpl_vars['a']['dc'])) ? $this->_run_mod_handler('default', true, $_tmp, '1') : smarty_modifier_default($_tmp, '1')),'separator' => ' '), $this);?>
</td>
</tr>
<tr>
  <td class="altbg1"><strong>是否有效</strong></td>
  <td colspan="4" class="altbg2"><?php echo smarty_function_html_radios(array('name' => "ad[status]",'options' => $this->_tpl_vars['AdsStatus'],'checked' => ((is_array($_tmp=@$this->_tpl_vars['a']['status'])) ? $this->_run_mod_handler('default', true, $_tmp, '1') : smarty_modifier_default($_tmp, '1')),'separator' => ' '), $this);?>
</td>
</tr>



<tr><td colspan="5" class="altbg1"><div align="center">
  <input type="submit" name="save" value="保存" class="btn_mouseout" onMouseOver="this.className='btn_mouseover'" onMouseOut="this.className='btn_mouseout'"/>
</div></td>
</tr>
</table>
<br />
<center>
</center>
</form>
</td></tr></table>
<br /><br />
</body>
</html>
